using Gateway.Infrastructure.AutoDI;
using Gateway.IQuery.Department.Request;
using Gateway.IQuery.Department.Result;

namespace Gateway.IQuery.Department;

/// <summary>
/// 部门查询服务
/// </summary>
public interface IDepartmentQuery : IDependency
{
    /// <summary>
    /// 获取部门详情
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<DepartmentDetailResult> GetDetail(string id);

    /// <summary>
    /// 获取部门树形结构
    /// </summary>
    /// <param name="request">请求参数</param>
    /// <returns></returns>
    Task<List<DepartmentTreeResult>> GetTree(DepartmentTreeRequest request);

    /// <summary>
    /// 分页列表
    /// </summary>
    /// <param name="request"></param>
    /// <returns></returns>
    Task<PageResult<DepartmentDetailResult>> GetPageList(DepartmentPageListRequest request);

    /// <summary>
    /// 根据父级标识 获取部门列表（包含子级）
    /// </summary>
    /// <param name="parentId">父级标识</param>
    /// <returns></returns>
    Task<List<string>> GetDepartmentIdListByParentId(string parentId);

    /// <summary>
    /// 根据父级层级编码 获取部门列表（包含子级）
    /// </summary>
    /// <param name="parentIdLevelCode">父级层级编码</param>
    /// <returns></returns>
    Task<List<string>> GetDepartmentIdListByParentLevelCode(string parentIdLevelCode);


    /// <summary>
    /// 根据集合获取部门详情
    /// </summary>
    /// <param name="ids"></param>
    /// <returns></returns>
    Task<List<DepartmentDetailResult>> GetDetailByIds(List<string> ids);
}